package com.dmjj.dmjjxt.service.impl;

import com.dmjj.common.base.BaseMapper;
import com.dmjj.common.base.BaseServiceImpl;
import com.dmjj.dmjjxt.dao.BoothMapper;
import com.dmjj.dmjjxt.dto.BoothDTO;
import com.dmjj.dmjjxt.service.BoothService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import java.util.List;


/**
 * 摊位信息表业务处理接口
 * @Author zhangxue
 * @Date 2019-04-11 14:13:52
 */
@Service
public class BoothServiceImpl extends BaseServiceImpl<BoothDTO, Long> implements BoothService {

    private static final Log LOGGER = LogFactory.getLog(BoothServiceImpl.class);

    @Autowired
    private BoothMapper mapper;

    @Override
    protected BaseMapper<BoothDTO, Long> getMapper() {
        return mapper;
    }

    /**
     * 摊位信息表列表
     * @Author zhangxue
     * @Date 2019-04-11 14:13:52
     * @Param
     * @Return
     */
    @Override
    public List<BoothDTO> list4Page(BoothDTO entity, Integer pageNum, Integer... pageSize) {
        return super.list4Page(entity, pageNum, pageSize);
    }

    /**
     * 摊位信息表列表（无分页）
     * @Author zhangxue
     * @Date 2019-04-11 14:13:52
     * @Param
     * @Return
     */
    @Override
    public List<BoothDTO> listByCondition(BoothDTO entity) {
        return super.listByCondition(entity);
    }

    /**
     * 查询摊位信息表详情信息
     * @Author zhangxue
     * @Date 2019-04-11 14:13:52
     * @Param
     * @Return
     */
    @Override
    public BoothDTO queryOneByPk(Long id) {
        return super.queryOneByPk(id);
    }

    /**
     * 保存摊位信息表信息
     * @Author zhangxue
     * @Date 2019-04-11 14:13:52
     * @Param
     * @Return
     */
    @Override
    @Transactional
    public Long save(BoothDTO entity) {
        return super.save(entity);
    }

    /**
     * 删除摊位信息表信息
     * @Author zhangxue
     * @Date 2019-04-11 14:13:52
     * @Param
     * @Return
     */
    @Override
    @Transactional
    public Integer delete(Long id) {
        return super.delete(id);
    }


    /**
     * @Author zhangxue 通过摊位号查询面积
     * @Description //TODO
     * @Date 10:21 2019/4/22
     * @Param
     * @return
     **/
    @Override
    public BoothDTO queryAreaByBoothno(BoothDTO boothDTO) {
        return mapper.queryAreaByBoothno(boothDTO);
    }
}
